function generator
A function generator has capability to generate the above waveforms but also custom shapes, which in some cases can be created and loaded into generator using software.
Some models contain high speed digital to analog converters that can emulate all sorts of shapes for the signal.
They can superimpose DC levels at the output.
They usually have filters at the output, to remove undesired harmonics.
Their frequency range is usually limited at the upper levels (tens of MHz, perhaps hundreds of MHz).
Example of function generators: Fluke 81, Arbitrary Function Generator Rigol DG4162.